
#ifdef FLASH_CODE_HEADER

static const uint32_t flash_code_STM32G0XX_128[134] = 
{
    0XE00ABE00,0X062D780D,0X24084068,0XD3000040,0X1E644058,0X1C49D1FA,0X2A001E52,0X4770D1F2,
    0X4A6AB672,0X608A496A,0X608A4A6A,0XBF00E000,0X0392690A,0XD1FA0F92,0X444A4A67,0X48676050,
    0X04008C00,0X60900980,0X60D00840,0X68004864,0X48640503,0X18180D1B,0X280AD01F,0X2810D01D,
    0X2001D01B,0X6A086010,0X0FC00280,0X6A086110,0XD40803C0,0X4A5C485D,0X10526002,0X22066002,
    0X4A5B6042,0X6A086082,0XD4040300,0X4959485A,0X217F6041,0X20006001,0X20004770,0X484EE7E2,
    0X68404448,0X484A6801,0XD0041C49,0X22016801,0X43910412,0X69416001,0X07D22201,0X61414311,
    0X8F4FF3BF,0X47702000,0X47702001,0X4A4B4840,0X13C16102,0X69416141,0X041B2301,0X61414319,
    0X8F4FF3BF,0XBF00E000,0X03896901,0XD1FA0F89,0X42116901,0X6102D002,0X47702001,0X47702000,
    0X4B35B530,0X444B2401,0X04E4681A,0XD10C2A01,0X29016919,0X6899D002,0XD10642A1,0X685968DD,
    0X4285194D,0X2101D801,0X2100E000,0XD0012A01,0XE006689A,0X2A01691A,0X689AD002,0XD10042A2,
    0X4B2E68DA,0X40101E52,0X0AC04A21,0X00C06113,0X1C800349,0X61504308,0X21016950,0X43080409,
    0XF3BF6150,0XE0008F4F,0X6910BF00,0X0F800380,0X6910D1FA,0XD0014018,0X20016113,0XB530BD30,
    0X4B131DC9,0X4D1D08C9,0X611D00C9,0X615C2401,0X6814E014,0X68546004,0XF3BF6044,0XE0008F4F,
    0X691CBF00,0X0FA403A4,0X691CD1FA,0XD002422C,0X2001611D,0X3008BD30,0X32083908,0XD1E82900,
    0X08406958,0X61580040,0XBD302000,0X45670123,0X40022000,0XCDEF89AB,0X00000004,0X1FFF75C0,
    0X40015800,0XFFFFFBAA,0X0000AAAA,0X40003000,0X00000FFF,0X000001FF,0X40002C00,0X0000C3FA,
    0X00000000,0X00000000,0X00000000,0X00000000,0X00000000,0X00000000,
};

static const program_target_t flash_algo_STM32G0XX_128 =
{
    0X20000021,  // Init
    0X2000009F,  // UnInit
    0X200000CD,  // EraseChip
    0X20000101,  // EraseSector
    0X2000017F,  // ProgramPage

    {
        0x20000001,  // BKPT : start of blob + 1
        0x20000C00,  // RSB  : address to access global/static data
        0x20001000,  // RSP  : stack pointer 
    },

    0x20000400,                      // mem buffer location
    0x20000000,                      // location to write prog_blob in target RAM
    sizeof(flash_code_STM32G0XX_128),       // prog_blob size
    flash_code_STM32G0XX_128,               // address of prog_blob 
    0x00000400,                      // ram_to_flash_bytes_to_be_written
};

#endif

#ifdef FLASH_CODE_TABLE
&flash_algo_STM32G0XX_128
#endif

